package com.code.day14;

import java.math.BigInteger;

public class Day14BigInteger {
    public static void main(String[] args) {
        BigInteger b1 = new BigInteger("121212121212121212121212121212121212121212121");
        BigInteger b2 = new BigInteger("121212121212121212121212121212121212121212121");
        //BigInteger add(BigInteger val) 返回其值为 (this + val) 的 BigInteger
        BigInteger add = b1.add(b2);
        System.out.println("add = " + add);
        //BigInteger subtract(BigInteger val) 返回其值为 (this - val) 的 BigInteger
        BigInteger subtract = b1.subtract(b2);
        System.out.println("subtract = " + subtract);
        //BigInteger multiply(BigInteger val)  返回其值为 (this * val) 的 BigInteger
        BigInteger multiply = b1.multiply(b2);
        System.out.println("multiply = " + multiply);
        //BigInteger divide(BigInteger val) 返回其值为 (this / val) 的 BigInteger
        BigInteger divide = b1.divide(b2);
        System.out.println("divide = " + divide);
    }
}
